package org.magnerfuller.imtoolkit.server.connection.event;

import org.magnerfuller.imtoolkit.server.connection.handler.ConnectionHandler;
import org.magnerfuller.imtoolkit.server.session.medium.SessionDescription;

/**
 * 
 * Class ConnectionEvent
 * 
 * This class represents the event of a connection being handled 
 * in a ConnectionHandler.
 *
 */
public class ConnectionEvent {

  /** source -- the source of the event */
  protected ConnectionHandler source;

  /** sessionDesc -- information on how to make session */
  protected SessionDescription sessionDesc;

  /**
   * Constructor
   *
   * @param source the source of the event
   * @param sessionDesc the information required to create a session
   *
   */
  public ConnectionEvent(ConnectionHandler source, SessionDescription sessionDesc) {
    this.source = source;
    this.sessionDesc = sessionDesc;
  }//ConnectionEvent

  /**
   * Get the source of this event.
   *
   * @return the source
   *
   */
  public ConnectionHandler getSource() {
    return source;
  }//getSource

  /**
   * Get the information necessary to create a session.
   *
   * @return the information
   *
   */
  public SessionDescription getSessionDescription() {
    return sessionDesc;
  }//getConnInfo

}//ConnectionEvent
